package Singleton;

/**
 * 静态内部类
 * 是否 Lazy 初始化：是
 * 是否多线程安全：是
 * User:xuzhidian
 * Date:2018/3/19
 * Time:23:29
 */
public class StaticInnerSingleton {
    /**
     * 把静态持有放入到静态内部类中去维护
     */
    private static class SingletonHolder {
        private static StaticInnerSingleton innerSingleton = new StaticInnerSingleton();
    }

    private StaticInnerSingleton() {

    }

    public static StaticInnerSingleton getInstatnce() {
        return SingletonHolder.innerSingleton;
    }
}
